package com.yang.springboot.web;

import com.yang.springboot.service.IStudentService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yanwei.yang
 * @date 2021/11/16 11:07
 * @description:
 */

@RestController
public class StudentController {


    @Resource
    private IStudentService studentService;


    @RequestMapping("student")
    public Object student(Integer id) {
        return studentService.getById(id);
    }


    @PostMapping("student2")
    public Object queryStudent(Integer id) {
        return studentService.getById(id);
    }
}
